from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, FileField, SubmitField
from wtforms.validators import DataRequired
from flask_wtf.file import FileRequired, FileAllowed


class UserForm(FlaskForm):
    pwd = PasswordField(u'Pasword', validators=[DataRequired()])
    pwd2 = PasswordField(u'Pasword', validators=[DataRequired()])
    mail = StringField(u'mail', validators=[DataRequired()])
    image = FileField(u'File', validators=[FileAllowed(['jpg'])])
    submit = SubmitField(u"提交")
